#include <stdio.h>

#define PRINT_A 0x1 // 0000 00001
#define PRINT_B 0x2 // 0000 00010
#define PRINT_C 0x4 // 0000 00100
#define PRINT_D 0x8 // 0000 01000
#define PRINT_DFL 0x0

void Show(int flags)
{
    if(flags & PRINT_A) printf("Hello A\n");
    if(flags & PRINT_B) printf("Hello B\n");
    if(flags & PRINT_C) printf("Hello C\n");
    if(flags & PRINT_D) printf("Hello D\n");

    if(flags == PRINT_DFL) printf("hello Default\n");
}

int main()
{
    printf("hello Default\n");
    Show(PRINT_DFL);

    printf("Hello A\n");
    Show(PRINT_A);
    printf("Hello B\n");
    Show(PRINT_B);
    printf("PRINT_A和PRINT_B\n");
    Show(PRINT_A | PRINT_B);
    printf("PRINT_C和PRINT_D\n");
    Show(PRINT_C | PRINT_D);
    printf("PRINT_A和PRINT_B和PRINT_C和PRINT_D\n");
    Show(PRINT_A | PRINT_B | PRINT_C | PRINT_D);


    return 0;
}